package com.sad.jetpack.v1.thememanager.api;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class ThemeExtension {
    private String image1="";
    private String image2="";
    private String image3="";
    private String image4="";

    public String getImage1() {
        return image1;
    }

    public void setImage1(String image1) {
        this.image1 = image1;
    }

    public String getImage2() {
        return image2;
    }

    public void setImage2(String image2) {
        this.image2 = image2;
    }

    public String getImage3() {
        return image3;
    }

    public void setImage3(String image3) {
        this.image3 = image3;
    }

    public String getImage4() {
        return image4;
    }

    public void setImage4(String image4) {
        this.image4 = image4;
    }

    public JSONObject toJson() throws Exception{
        JSONObject jsonObject=new JSONObject();
        jsonObject.put("image1",image1);
        jsonObject.put("image2",image2);
        jsonObject.put("image3",image3);
        jsonObject.put("image4",image4);
        return jsonObject;
    }

    public static ThemeExtension fromJson(JSONObject jsonObject){
        ThemeExtension extension=new ThemeExtension();
        extension.setImage1(jsonObject.optString("image1"));
        extension.setImage2(jsonObject.optString("image2"));
        extension.setImage3(jsonObject.optString("image3"));
        extension.setImage4(jsonObject.optString("image4"));
        return extension;
    }

}
